<?php defined('SYSPATH') or die('No direct script access.');

class personHelper {
	
	public static function createPersonFormFields($fb, $idcardTypeOptions, $countryOptions) {
		$fb->text('first_name')->required();
		$fb->text('last_name')->required();
		$fb->text('other_names')->hint();
		$fb->text('title');
		$fb->text('yoga_name');
		$fb->radioButtons('gender', array('M','F'), 'person.gender-')->required();
		$fb->date('birth_date');
		
		$fb->delimiter(text::get('person-idetificationPapers'));
		$fb->description(text::get('person-weNeedIdCardNumber'));
		$fb->comboBox('idcard_type', $idcardTypeOptions);
		$fb->text('idcard_number');
		$fb->comboBox('citizenship_code', $countryOptions)->hint();
		
		$fb->delimiter(text::get('person-permanentAddress'));
		$fb->text('street');
		$fb->text('city');
		$fb->text('postal_code');
		$fb->comboBox('country_code', $countryOptions)->required();
		
		$fb->delimiter();
		$fb->comboBox('country_of_residence_code', $countryOptions)->required();
		$fb->comboBox('preferred_language', form::languageOptions())->noEmptyOption()->required();
		
		$fb->spacer();
		$fb->text('telephone');
		$fb->text('email');
		$fb->yesNoBox('is_ztp')->hint();
		
		$fb->submitButton();
		
		return $fb;
	}
}
